Defines a low level graphics interface for drawing content on PDF pages.
The methods in this class match the PDF operators defined in the PDF specification.
A PDFContentStream object is created from a object and lets you inject specific PDF operators in the object, operators that are not available through the public API.
This class gives you full control over the generated page content but it requires good knowledge of PDF specification.

Full documentation

Initializes a new PDFContentStream Object.

Full documentation

Adds the given operator to the content stream.

Full documentation

Begins a compatibility section. Operator: BX.

Full documentation

Begins an inline image. Operator: BI.

Full documentation

Begins the data section of an inline image. Operator: ID.

Full documentation

Begins a marked-content sequence.

Full documentation

Begins a marked-content sequence with an associated property list.

Full documentation

Begins a text section. Operator: BT.

Full documentation

Append a cubic Bézier curve to the current path. Operator: c

Full documentation

Clears the entire content stream.

Full documentation

Closes and strokes the current path. Operator: s.

Full documentation

Closes the current path, fills the path using the fillMode and then strokes the path. Operator: b for PDFFillMode.NonZeroWinding or b* for PDFFillMode.EvenOdd.

Full documentation

Closes the current path. Operator: h.

Full documentation

Concatenates the given matrix with the current transformation matrix. Operator: cm

Full documentation

Defines a marked-content point.

Full documentation

Defines a marked-content point with an associated property list.

Full documentation

Ends a compatibility section. Operator: EX.

Full documentation

Ends an inline image. Operator: EI.

Full documentation

Ends a marked content section. Operator: EMC.

Full documentation

Ends the current path. Operator: n.

Full documentation

Ends a text section. Operator: ET.

Full documentation

Fills the current path using the fillMode and then strokes the path. Operator: B for PDFFillMode.NonZeroWinding or B* for PDFFillMode.EvenOdd.

Full documentation

Fills the current path using the fillMode. Operator: f for PDFFillMode.NonZeroWinding or f* for PDFFillMode.EvenOdd.

Full documentation

Appends a line segment to current path from current point to (x, y). Operator: l

Full documentation

Moves the text position. Operator: Td

Full documentation

Moves the text position. Operator: TD

Full documentation

Begins a new subpath at (x, y). Operator: m

Full documentation

Moves to the start of the next line. Operator: T*

Full documentation

Appends a rectangle to current path. Operator: re

Full documentation

Resets the coordinate system to default PDF coordinate system.

Full documentation

Restores the current graphics state. Operator: Q.

Full documentation

Restores the coordinate system as it has been setup initially by class.

Full documentation

Saves the current graphics state. Operator: q.

Full documentation

Sets the character spacing. Operator: Tc

Full documentation

Sets the current path as clipping path. Operator: W for PDFFillMode.NonZeroWinding or W* for PDFFillMode.EvenOdd.

Full documentation

Sets the current colorspace for fill operations to DeviceCMYK and sets the current CMYK color. Operator: k

Full documentation

Sets the current colorspace for stroke operations to DeviceCMYK and sets the current CMYK color. Operator: K

Full documentation

Sets the current graphics state in the content stream. Operator: gs

Full documentation

Sets the current fill color. Operator: sc

Full documentation

Sets the current fill color. Operator: scn

Full documentation

Sets the current fill color. Operator: scn

Full documentation

Sets the current fill color and pattern. Operator: scn

Full documentation

Sets the fill colorspace. Operator: cs

Full documentation

Set the flatness tolerance in the graphics state. Operator: i

Full documentation

Sets the current colorspace for fill operations to DeviceGray and sets the gray level. Operator: g

Full documentation

Sets the current colorspace for stroke operations to DeviceGray and sets the gray level. Operator: g

Full documentation

Set the line cap style in the graphics state. Operator: J

Full documentation

Sets the dash offset and pattern for stroke operations. Operator: d

Full documentation

Set the line join style in the graphics state. Operator: j

Full documentation

Sets the line width in the graphics state.

Full documentation

Set the miter limit in the graphics state. Operator: M

Full documentation

Sets the current colorspace for fill operations to DeviceRGB and sets the current RGB color. Operator: rg

Full documentation

Sets the current colorspace for stroke operations to DeviceRGB and sets the current RGB color. Operator: RG

Full documentation

Sets the current stroke color. Operator: SC

Full documentation

Sets the current stroke color. Operator: SCN

Full documentation

Sets the current stroke color. Operator: scn

Full documentation

Sets the current stroke color and pattern. Operator: SCN

Full documentation

Sets the stroke colorspace. Operator: CS

Full documentation

Sets the current font and size for text show operators. Operator: Tf

Full documentation

Sets the text horizontal scaling. Operator: Tz

Full documentation

Sets the text leading. Operator: TL

Full documentation

Sets the current text matrix and text line matrix. Operator: Tm

Full documentation

Sets the text rendering mode. Operator: Tr

Full documentation

Sets the text rise. Operator: Ts

Full documentation

Sets the word spacing. Operator: Tw

Full documentation

Shows a form XObject on the page. Operator: Do

Full documentation

Shows an image on the page. Operator: Do

Full documentation

Shows a shading on the page. Operator: sh

Full documentation

Shows the specified text on the page. Operator: Tj

Full documentation

Shows one or more text strings, allowing individual glyph positioning.

Full documentation

Strokes the current path. Operator: S.

Full documentation

Append a cubic Bézier curve to the current path. Operator: v

Full documentation

Writes the specified byte to the content stream.

Full documentation

Writes the specified bytes to the content stream.

Full documentation

Writes the specified bytes to the content stream.

Full documentation

Append a cubic Bézier curve to the current path. Operator: y

Full documentation